import request from '../utils/request'

export function loginApi(username, password) {
  return request({
    url: '/auth/login',
    method: 'post',
    data: { username, password }
  })
}

export function registerApi(data) {
  return request({
    url: '/auth/register',
    method: 'post',
    data
  })
}

// 刷新token
export function refreshTokenApi(refreshToken) {
  return request({
    url: '/auth/refresh',
    method: 'post',
    data: { RefreshToken: refreshToken }
  })
}
